using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class idMap : EntityTypeConfiguration<id>
    {
        public idMap()
        {
            // Primary Key
            this.HasKey(t => t.id_cnt);

            // Properties
            this.Property(t => t.id_cnt)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("ids");
            this.Property(t => t.id_cnt).HasColumnName("id_cnt");
            this.Property(t => t.ITEMTYPE).HasColumnName("ITEMTYPE");
            this.Property(t => t.ITEMCATEG).HasColumnName("ITEMCATEG");
            this.Property(t => t.CURRENCY).HasColumnName("CURRENCY");
            this.Property(t => t.RATE).HasColumnName("RATE");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
            this.Property(t => t.app_cnt).HasColumnName("app_cnt");
            this.Property(t => t.vac_cnt).HasColumnName("vac_cnt");
            this.Property(t => t.bre_cnt).HasColumnName("bre_cnt");
            this.Property(t => t.vc_cnt).HasColumnName("vc_cnt");
            this.Property(t => t.perio_cnt).HasColumnName("perio_cnt");
        }
    }
}
